package com.companyName.sample.service.impl.sys;

import com.companyName.sample.api.service.sys.UserService;
import com.companyName.sample.bean.dto.sys.UserDto;
import com.companyName.sample.bean.dto.sys.UserVo;
import com.companyName.sample.common.util.PageInfo;
import com.companyName.sample.service.business.UserBiz;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    private static final Logger logger = LoggerFactory.getLogger(LogServiceImpl.class);

    @Autowired
    private UserBiz userBiz;

    @Override
    public UserDto findUserByLoginName(String username) {
        return userBiz.findUserByLoginName(username);
    }

    @Override
    public UserDto findUserById(Long id) {
        return userBiz.findUserById(id);
    }

    @Override
    public void findDataGrid(PageInfo pageInfo) {
        userBiz.findDataGrid(pageInfo);
    }

    @Override
    public void addUser(UserVo userVo) {
        userBiz.addUser(userVo);
    }

    @Override
    public void updateUserPwdById(Long userId, String pwd) {
        userBiz.updateUserPwdById(userId, pwd);
    }

    @Override
    public UserVo findUserVoById(Long id) {
        return userBiz.findUserVoById(id);
    }

    @Override
    public void updateUser(UserVo userVo) {
        userBiz.updateUser(userVo);
    }

    @Override
    public void deleteUserById(Long id) {
        userBiz.deleteUserById(id);
    }

}
